/**
 * 
 */
package id.co.krakatauit;

import java.text.DecimalFormat;
import java.text.NumberFormat;
import java.util.Calendar;
import java.util.Date;

import org.apache.commons.lang3.BooleanUtils;
import org.apache.commons.lang3.EnumUtils;
import org.apache.commons.lang3.JavaVersion;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.Validate;

/**
 * @author Anita
 * 
 */
public class Eclipselat2 {
	public static void main(String[] args) {

		System.out.println("Ini Aplikasi Yang kedua class");
		System.out.println(StringUtils.lowerCase("Camel case tambahin"));
		System.out.println(BooleanUtils.toBooleanObject(0));
		System.out.println(Validate.notBlank("1"));
		System.out.println(JavaVersion.JAVA_1_8);
		System.out.println(EnumUtils.class.getFields());

		Eclipselat2 appku = new Eclipselat2();
		System.out.println(appku.multiply(2.31, 5));

		System.out.println(Math.round(appku.multiply(2.3, 3)));

		NumberFormat n = new DecimalFormat("#,##.000");
		System.out.println(n.format(appku.multiply(2.31, 5)));

		waktu();
		//Eclipselatihan appmu = new Eclipselatihan();
		//appmu.main(null);
	}

	public static double multiply(double a, int b) {
		return Math.pow(b, a);

	}

	public static void waktu() {
		Date date = new Date();
		// System.out.println(date);
		System.out.println(date);

		Calendar calendar = Calendar.getInstance();
		calendar.add(Calendar.MONTH, -1);
		Date date2 = calendar.getTime();
		System.out.println(date2);

		long mil1 = date.getTime();
		long mil2 = date2.getTime();

		System.out.println((mil1 - mil2) / 1000 / 60 / 60 / 24);
		System.out.println("TAMBAHAN");
	}
}
